Some cloud providers offer a subscription, which has a fixed monthly fee
instead of pay-per-use (unlike the API keys).
In a nutshell, subscription-based providers work by either reusing your
existing CLI tools (e.g. Claude Code, GitHub Copilot and OpenAI Codex via
ACP) whereas some require installing the ACP server manually (e.g. Google
Antigravity). Because they require something to be installed on your device,
these providers are not available on Mobile (Android or iOS) or standalone
mode.
See also the dedicated Privacy section
to better understand what data is being sent to a cloud provider.
Claude Code
To use a subscription:
First, Claude Code needs to be installed on the machine that runs Trilium.
So for a Desktop Installation,
Claude needs to be installed locally and for a Server Installation accessed via
a browser, Claude needs to be installed on the server.
Claude Code must already be authenticated. To do so, run claude in
a terminal once, type /login and follow the instructions.
Go to Options → AI / LLM and
add the Claude Code provider.
Trilium will identify your Claude Code binary in this order:
By looking for a TRILIUM_CLAUDE_CODE_PATH environment variable
pointing to the Claude binary. This allows overriding the path if needed.
By looking for claude in your PATH, generally works in most
circumstances.
By asking your login shell for its PATH which lets a desktop
install find a CLI installed through nvm, fnm, asdf or
Homebrew, since a GUI-launched app doesn't inherit your terminal's environment.
After your provider is set up, you'll benefit from the same features as
an API key (note tools, web search, extended thinking, image/PDF attachments,
streaming).
GitHub Copilot
GitHub Copilot gives access to the models of your GitHub Copilot subscription
(Pro, Pro+, Business or Enterprise), without an API key. Usage counts against
your Copilot plan.
Install the GitHub Copilot CLI on the machine that runs Trilium, for example
with npm install -g @github/copilot. As with Claude Code, for
a Server Installation it
needs to be installed on the server.
Sign in by running copilot login in a terminal once. If you
already use GitHub Copilot in another editor on the same machine, that
login is reused.
Go to Options → AI / LLM and
add the GitHub Copilot provider.
Trilium will identify your Copilot CLI in this order:
By looking for a TRILIUM_COPILOT_PATH environment variable
pointing to the Copilot binary.
By looking for copilot in your PATH.
By asking your login shell for its PATH, the same as for Claude
Code.
Known limitations
The agent can only work with your notes through Trilium's note tools;
its own file, shell and web tools are blocked for security reasons.
Images can be attached to the conversation, PDFs cannot. The LLM should
still be able to read PDF notes and attachments via Text Extraction (OCR) when the
note tools are enabled.
Google Antigravity
Google Antigravity gives access to Gemini models using a Google account
(free, Google AI Pro or Google AI Ultra), without an API key. At the time
of writing, a free Google account is enough to use it.
Unlike Claude Code or GitHub Copilot, Google's Antigravity ACP server
is not part of the CLI so it needs to be installed manually just for Trilium.
The downloaded archive is around 112-334 MB and the extracted size is around
230 MB-2 GB based on the platform.
On Windows, macOS and Linux (excluding NixOS):
Download Google's Antigravity ACP server for your platform. The link is
shown when adding the provider in Options → AI / LLM.
Unpack it on the device that runs Trilium.
Make it findable by Trilium, either:
by adding the unpacked folder to your PATH, or
by setting a TRILIUM_ANTIGRAVITY_ACP_PATH environment variable
pointing to agy_acp_server.exe (Windows) or agy_acp_server.par (Linux
and macOS).
Go to Options →
AI / LLM and add the Google Antigravity provider. When the list of models
is loaded for the first time, the Google sign-in page opens in a browser
on the machine running Trilium; finish signing in there.
On NixOS, antigravity-acp package is already available but
only in nixos-unstable at the time of writing. The easiest method
to test it out is to use the nix shell with flakes:
The agent can only work with your notes through Trilium's note tools;
its own file and shell tools are blocked for security reasons.
The Antigravity ACP server requires authentication via a login link. The
login link needs to be run on the same device, so it might not be possible
to set up the provider while using the web version of a Docker installation. Desktop Installation should
work fine.
Images can be attached to the conversation, PDFs cannot. The LLM should
still be able to read PDF notes and attachments via Text Extraction (OCR) when the
note tools are enabled.
The results of tool calls (e.g. reading a note, writing attributes) are
not properly displayed because they are not exposed by the ACP server.
OpenAI Codex
OpenAI Codex gives access to the Codex models of your ChatGPT plan (Free,
Go, Plus, Pro or Business), without an API key. At the time of writing,
a free ChatGPT account is enough to use it. Usage counts against your plan's
Codex limits, which are small on the Free plan.
Install the Codex CLI on the machine that runs Trilium, for example with npm install -g @openai/codex.
As with Claude Code, for a Server Installation it
needs to be installed on the server. Trilium ships the ACP adapter that
connects to it, so nothing else is needed.
Go to Options → AI / LLM and
add the OpenAI Codex provider. When the list of models is loaded for the
first time, the ChatGPT sign-in page opens in a browser on the machine
running Trilium; finish signing in there.
Trilium keeps its own Codex sign-in and settings, separate from any Codex
CLI you use in a terminal, so an existing codex login is not
reused.
Trilium will identify your Codex CLI in this order:
By looking for a TRILIUM_CODEX_PATH environment variable pointing
to the Codex binary.
By looking for codex in your PATH.
By asking your login shell for its PATH, the same as for Claude
Code.
On NixOS, Codex is available as the codex package in nixpkgs.
The stable channel can lag behind Codex's releases, so a newer version
can be taken from nixos-unstable:
The agent can only work with your notes through Trilium's note tools,
and search the web when the chat allows it; its own file, shell and other
tools are blocked for security reasons.
The ChatGPT sign-in opens in a browser on the device running Trilium,
so it might not be possible to set up the provider while using the web
version of a Docker installation. Desktop Installation should
work fine.
Images and SVGs can be attached to the conversation, PDFs cannot. The
LLM should still be able to read PDF notes and attachments via Text Extraction (OCR) when the note
tools are enabled.